67ab00e01ec06d7b removed the fake configure code in gtk_window_show() and
replaced it with a simple gtk_widget_realize(). The initial allocation
code in realize() only allocates the natural size or the last requested
size which now no longer is set, resulting in a too small first allocation.
This builds a configure request to compute the allocation size instead
which includes default size, CSD etc..
This problem could be seen in case of a GtkPaned in a GtkWindow with a
default size set and the pane position set as well. The first allocation
would be the natural size of the GtkPaned which would clamp the pane
position if too larg. Only the second allocation would fill the parent
window using the now wrong pane position.
https://bugzilla.gnome.org/show_bug.cgi?id=759705
allocation.width == 1 &&
allocation.height == 1)
{
- gint w, h;
+ GdkRectangle request;
+ gint default_width, default_height;
+
+ gtk_window_compute_configure_request (window, &request, NULL, NULL);
allocation.x = 0;
allocation.y = 0;
-
- gtk_window_guess_default_size (window, &allocation.width, &allocation.height);
- gtk_window_get_remembered_size (window, &w, &h);
- allocation.width = MAX (allocation.width, w);
- allocation.height = MAX (allocation.height, h);
+ allocation.width = request.width;
+ allocation.height = request.height;
gtk_widget_size_allocate (widget, &allocation);
gtk_widget_queue_resize (widget);